import request from "@/api/request";

/**
 * 获取分类
 */
export function getMessageTypeApi(): Promise<any[]> {
  return request.get("/api/messageType/list");
}

/**
 * 获取该分类的列表
 */
export function getMessageListApi(params?: any): Promise<any[]> {
  return request({
    url: "/api/messageList/list",
    method: "get",
    params,
  });
}

export function getMessageDetail(id?: any): Promise<any[]> {
  return request({
    url: "/api/messageList/" + id,
    method: "get",
  });
}
